Auto merge of #5196 - matklad:clapclapclap, r=alexcrichton
authorbors <bors@rust-lang.org>
Fri, 16 Mar 2018 15:08:24 +0000 (15:08 +0000)
committerbors <bors@rust-lang.org>
Fri, 16 Mar 2018 15:08:24 +0000 (15:08 +0000)
commitd6c3983fe3bd8fa06b54712e53fb23645598188b
tree785190c67e79372caac65dc1f16d8868c77fb174
parent1184854427a938bd981f037f19364ad8713fe13b
parent70ff33a5378407021e3e496d01d72156f775c30f
Auto merge of #5196 - matklad:clapclapclap, r=alexcrichton

Fix a regression with parsing multivalue options

By default, clap interprets

```
cargo run --bin foo bar baz
```

as

```
cargo run --bin foo --bin bar --bin baz
```

This behavior is different from docopt and does not play nicely with
positional arguments at all. Luckily, clap has a flag to get the
behavior we want, it just not the default! It will become the default in
the next version of clap, but, until that time, we should be careful
when using the combination of `.long`, `.value_name` and
`.multiple(true)`, and don't forget to specify `.number_of_values(1)` as
well.

@alexcrichton I'd love to merge this fix before updating cargo at rust-lang/rust :)